package com.domor.system.domain;

import java.util.Date;

import com.domor.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <h3>sys_msg</h3>
 * @author liyuyang
 * @date 2020/5/22
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class SysMsg extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    private Integer msgId;

    /**
     * 接收人
     */
    private String receiver;

    /**
     * 消息类型
     */
    private String msgType;

    /**
     * 对应模块的记录ID
     */
    private Integer recordId;

    /**
     * 消息内容
     */
    private String content;

    /**
     * 消息状态(0未发送；1未读；2已读)
     */
    private Integer status;

    /**
     * 查看消息时间
     */
    private Date readTime;

    public SysMsg(){}

    public SysMsg(String receiver, String msgType, String content, int recordId, String createBy) {
        this.msgType = msgType;
        this.content = content;
        this.recordId = recordId;
        this.receiver = receiver;
        this.status = 0;
        this.setCreateBy(createBy);
    }

}